/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Dominik
 */
@ManagedBean
@RequestScoped
public class Nachricht {
    private String code1;
    private String code2;
    private String geheimeNachricht;
    private int anzahl;

    /**
     * Creates a new instance of Nachricht
     */
    public Nachricht() {
    }

    /**
     * @return the code1
     */
    public String getCode1() {
        return code1;
    }

    /**
     * @param code1 the code1 to set
     */
    public void setCode1(String code1) {
        this.code1 = code1;
    }

    /**
     * @return the code2
     */
    public String getCode2() {
        return code2;
    }

    /**
     * @param code2 the code2 to set
     */
    public void setCode2(String code2) {
        this.code2 = code2;
    }

    /**
     * @return the geheimeNachricht
     */
    public String getGeheimeNachricht() {
        return geheimeNachricht;
    }

    /**
     * @param geheimeNachricht the geheimeNachricht to set
     */
    public void setGeheimeNachricht(String geheimeNachricht) {
        this.geheimeNachricht = geheimeNachricht;
    }

    /**
     * @return the anzahl
     */
    public int getAnzahl() {
        return anzahl;
    }

    /**
     * @param anzahl the anzahl to set
     */
    public void setAnzahl(int anzahl) {
        this.anzahl = anzahl;
    }
    
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Code 1: ").append(code1).append(", ");
        sb.append("Code 2: ").append(code2).append(", ");
        sb.append("Nachricht: ").append(geheimeNachricht).append(", ");
        sb.append("Anzahl: ").append(anzahl).append("\n");
        return sb.toString();
    }
}
